package ronglei.day01.demo01;

public class HelloWord {
    public static void main(String[] args) {
        System.out.println("你好HelloWord");
        ronglei();
       int rong =   method1(4,8);
        System.out.println(rong);
        System.out.println("_+++++");
        method2(5,5);
    }

    //定义方法 不会自己执行，如果执行必须调用
    public static void ronglei(){
        for (int i = 0; i < 5; i++) {
            for (int i1 = 0; i1 < 20; i1++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }

    //有返回值必须知道返回什么类型的值
    public static  int method1(int a,int b){
        int haha = a+b;
        return haha;
    }
    //没有返回值
    public  static  void  method2(int c,int d){
        int lei = c*d;
        System.out.println(lei);
    }

}
